package com.bj.disc.ui.splash.activity

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.ai3d.rfid.base.activity.BaseContainerVmActivity
import com.ai3d.rfid.base.vm.ContainerViewModel
import com.ai3d.rfid.databinding.LayoutContainerBinding
import com.bj.disc.ui.splash.fragment.SplashFragment

class SplashActivity : BaseContainerVmActivity<ContainerViewModel, LayoutContainerBinding>() {
    companion object {
        fun startSplashActivity(activity: Activity) {
            var intent = Intent(activity, SplashActivity::class.java)
            activity.overridePendingTransition(0, 0)
            intent.addFlags(
                Intent.FLAG_ACTIVITY_CLEAR_TASK
                        or Intent.FLAG_ACTIVITY_NEW_TASK
                        or Intent.FLAG_ACTIVITY_NO_ANIMATION
            )
            activity.finish()
            activity.overridePendingTransition(0, 0)
            activity.startActivity(intent)
        }
    }

    override fun initView(savedInstanceState: Bundle?) {
        changeFragment(SplashFragment())
    }


//    override fun onStop() {
//        super.onStop()
//        ClientManager.stop()
//    }
}